<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

<div id="suppliersManagement">

	<h2><fmt:message key="header.suppliersManagement"/></h2>

	<form:form modelAttribute="supplierManagementBean">
		<div class="search_form">
			<div class="left_col">
				<div class="first_row">
					<div class="label_holder">
						<fmt:message key="site.name"/>:
					</div>
					<div class="input_holder">
						<form:input path="supplierNameFilter"/>
					</div>
				</div>
				<div class="second_row">
					<div class="label_holder">
						<fmt:message key="site.suppliedItemName"/>:
					</div>
					<div class="input_holder">
						<form:input path="suppliedItemNameFilter"/>
					</div>
				</div>
			</div>
			<div class="right_col">
				<div>
					<div class="email_label_holder">
						<fmt:message key="site.email"/>:
					</div>
					<div class="input_holder">
						<form:input path="supplierEmailFilter"/>
					</div>
				</div>
			</div>
			<div class="search_btn_col">
				<input type="image" name="_eventId_search" value="<fmt:message key="button.search"/>" src="<c:url value="/images/buttons/search_btn.PNG"/>"/>
			</div>
		</div>
	</form:form>

	<form:form modelAttribute="supplierManagementBean">
		<div class="middle_col">
			<div>
				<label class="title"><fmt:message key="site.suppliers"/>:</label>
			</div>
			
			<div class="suppliers_holder">
				<form:select path="supplierIds" multiple="multiple">
					<c:if test="${not empty suppliers}">
						<c:forEach var="supplier" items="${suppliers}">
							<option value="${supplier.id}">${supplier.name}</option>
						</c:forEach>
					</c:if>
				</form:select>
			</div>
		</div>
		<div class="btn_row">
			<input type="image" name="_eventId_add" value="<fmt:message key="button.add"/>" src="<c:url value="/images/buttons/add_btn.PNG"/>"/>
			<input type="image" name="_eventId_edit" value="<fmt:message key="button.edit"/>" src="<c:url value="/images/buttons/edit_btn.PNG"/>"/>
			<input type="image" name="_eventId_delete" value="<fmt:message key="button.delete"/>" src="<c:url value="/images/buttons/delete_btn.PNG"/>"/>
			<input type="image" name="_eventId_viewDetails" value="<fmt:message key="button.viewDetails"/>" src="<c:url value="/images/buttons/viewDetails_btn.PNG"/>"/>
		</div>
	</form:form>
</div>